package com.cwl.pattern.中介者模式;

/**
 * @program: pattern
 * @description:
 * @author: ChenWenLong
 * @create: 2019-07-09 22:13
 **/
public class MediatorPattern {
    public static void main(String[] args) {
        Mediator md=new ConcreteMediator();
        Colleague c1,c2;
        c1=new ConcreteColleagueA();
        c2=new ConcreteColleagueB();
        md.register(c1);
        md.register(c2);
        c1.send();
        System.out.println("-------------");
        c2.send();
    }
}
